<?php
namespace Tools\Controller;
use Common\Controller\HomebaseController;

/**
 * 楼盘预约.
 * User: 郝飞
 * Date: 2017/3/4
 * Time: 15:54
 */
class MakeController extends HomebaseController{

	public function index(){
		$houses_id = I("houses_id/d");
		$this->assign("houses_id",$houses_id);
		$this->display();
	}

	public function adMake() {
		$houses_id = I("houses_id/d"); //楼盘id
		$user_name = I("name"); //名字
		$identity = I("identity");    //身份证号
		$mobile = I("mobile");    //手机号

		$data['houses_id'] = $houses_id;
		$data['user_name'] = $user_name;
		$data['user_identity'] = $identity;
		$data['user_mobile'] = $mobile;
		$data['make_addtime'] = time();
		$adMake = D('Make')->data($data)->add();

		if($adMake){
			$this->success('预约成功！');
		}else{
			$this->error("预约失败！");
		}
	}
}